package com.jsm.tf.exception;

import lombok.Data;

@Data
public class BusinessException extends RuntimeException {
    private String errorMsg;
    private int code;

    public BusinessException(int code, String errorMsg) {
        super(errorMsg);
        this.code=code;
        this.errorMsg=errorMsg;
    }

    public BusinessException(String errorMsg) {
        super(errorMsg);
        this.code=500;
        this.errorMsg=errorMsg;
    }

}
